package com.company.dcm;

import com.company.dcm.server.tcp.NettyServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@MapperScan("com.company.dcm.mapper")
@EnableAsync
public class DCMApplication implements CommandLineRunner {
    @Autowired
    private NettyServer nettyServer;
    public static void main(String[] args) {
        SpringApplication.run(DCMApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        nettyServer.start();
    }
}
